package course13;

public class Mistake3 {

    private static int divide(int one, int two)throws Exception{
        if (two == 0) {
            throw new Exception("两数相除，除数不能为0！！！");
        } else {
            System.out.println("两数相除，结果为：" + one / two);
        }

        return -1;
    }

    public static void main(String[] args) {
        try {
            divide(10, 0);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }

   //   int s = divide(12, 3);
      //  System.out.println(s);
    }
}
